<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
	<script>
		function Parent(){
    		this.name = 'wang';
		}

		function Child(){
		    this.age = 28;
		}
		Child.prototype = new Parent();//继承了Parent，通过原型
		var demo = new Child();
		alert(demo.age);
		alert(demo.name);//得到被继承的属性
	</script>
</body>
</html>